Optimal. Leaf size=83 \[ -\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \sqrt {c} \sqrt {g} \cos (e+f x)}{\sqrt {c+d} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {c} \sqrt {c+d} f \sqrt {g}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3009, 211}
\begin {gather*} -\frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a} \sqrt {c} \sqrt {g} \cos (e+f x)}{\sqrt {c+d} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {c} f \sqrt {g} \sqrt {c+d}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3009
Rubi steps
\begin {align*} \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx &=-\frac {(2 a) \text {Subst}\left (\int \frac {1}{a c+a d+c g x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{f}\\ &=-\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \sqrt {c} \sqrt {g} \cos (e+f x)}{\sqrt {c+d} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {c} \sqrt {c+d} f \sqrt {g}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 47.76, size = 436, normalized size = 5.25 \begin {gather*} \frac {\left (\frac {1}{4}+\frac {i}{4}\right ) g \left (\sqrt {c+i \sqrt {-c^2+d^2}} \left (i c-i d+\sqrt {-c^2+d^2}\right ) \tan ^{-1}\left (\frac {d-\left (-i c+\sqrt {-c^2+d^2}\right ) (\cos (e+f x)+i \sin (e+f x))}{\sqrt {2} \sqrt {c} \sqrt {c+i \sqrt {-c^2+d^2}} \sqrt {-1+\cos (2 (e+f x))+i \sin (2 (e+f x))}}\right )+\sqrt {c-i \sqrt {-c^2+d^2}} \left (-i c+i d+\sqrt {-c^2+d^2}\right ) \tan ^{-1}\left (\frac {d+\left (i c+\sqrt {-c^2+d^2}\right ) (\cos (e+f x)+i \sin (e+f x))}{\sqrt {2} \sqrt {c} \sqrt {c-i \sqrt {-c^2+d^2}} \sqrt {-1+\cos (2 (e+f x))+i \sin (2 (e+f x))}}\right )\right ) \sqrt {a (1+\sin (e+f x))} \left (\cos \left (\frac {3}{2} (e+f x)\right )-i \sin \left (\frac {3}{2} (e+f x)\right )\right ) (-1+\cos (2 (e+f x))+i \sin (2 (e+f x)))^{3/2}}{\sqrt {2} \sqrt {c} d \sqrt {-c^2+d^2} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (g \sin (e+f x))^{3/2}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(525\) vs.
\(2(63)=126\).
time = 0.31, size = 526, normalized size = 6.34
method | result | size |
default | \(-\frac {2 \sqrt {-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}}\, \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \sin \left (f x +e \right ) \left (\arctan \left (\frac {c \sqrt {-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}}}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \sqrt {-\left (c -d \right ) \left (c +d \right )}-\arctan \left (\frac {c \sqrt {-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}}}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, c +\arctan \left (\frac {c \sqrt {-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}}}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, d -\arctanh \left (\frac {c \sqrt {-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}}}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, \sqrt {-\left (c -d \right ) \left (c +d \right )}-\arctanh \left (\frac {c \sqrt {-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}}}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, c +\arctanh \left (\frac {c \sqrt {-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}}}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, d \right )}{f \sqrt {g \sin \left (f x +e \right )}\, \left (-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )\right ) \sqrt {-\left (c -d \right ) \left (c +d \right )}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\) | \(526\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 176 vs.
\(2 (66) = 132\).
time = 1.05, size = 1341, normalized size = 16.16 \begin {gather*} \left [\frac {\sqrt {-\frac {a}{{\left (c^{2} + c d\right )} g}} \log \left (\frac {{\left (128 \, a c^{4} + 256 \, a c^{3} d + 160 \, a c^{2} d^{2} + 32 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{5} + a c^{4} + 4 \, a c^{3} d + 6 \, a c^{2} d^{2} + 4 \, a c d^{3} + a d^{4} - {\left (128 \, a c^{4} + 192 \, a c^{3} d + 64 \, a c^{2} d^{2} - 4 \, a c d^{3} - a d^{4}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (208 \, a c^{4} + 368 \, a c^{3} d + 195 \, a c^{2} d^{2} + 32 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{3} + 2 \, {\left (64 \, a c^{4} + 94 \, a c^{3} d + 29 \, a c^{2} d^{2} - 4 \, a c d^{3} - a d^{4}\right )} \cos \left (f x + e\right )^{2} - 8 \, {\left (51 \, c^{5} + 110 \, c^{4} d + 76 \, c^{3} d^{2} + 18 \, c^{2} d^{3} + c d^{4} + {\left (16 \, c^{5} + 40 \, c^{4} d + 34 \, c^{3} d^{2} + 11 \, c^{2} d^{3} + c d^{4}\right )} \cos \left (f x + e\right )^{4} - {\left (24 \, c^{5} + 52 \, c^{4} d + 35 \, c^{3} d^{2} + 7 \, c^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} - {\left (66 \, c^{5} + 149 \, c^{4} d + 110 \, c^{3} d^{2} + 29 \, c^{2} d^{3} + 2 \, c d^{4}\right )} \cos \left (f x + e\right )^{2} + {\left (25 \, c^{5} + 53 \, c^{4} d + 35 \, c^{3} d^{2} + 7 \, c^{2} d^{3}\right )} \cos \left (f x + e\right ) - {\left (51 \, c^{5} + 110 \, c^{4} d + 76 \, c^{3} d^{2} + 18 \, c^{2} d^{3} + c d^{4} - {\left (16 \, c^{5} + 40 \, c^{4} d + 34 \, c^{3} d^{2} + 11 \, c^{2} d^{3} + c d^{4}\right )} \cos \left (f x + e\right )^{3} - {\left (40 \, c^{5} + 92 \, c^{4} d + 69 \, c^{3} d^{2} + 18 \, c^{2} d^{3} + c d^{4}\right )} \cos \left (f x + e\right )^{2} + {\left (26 \, c^{5} + 57 \, c^{4} d + 41 \, c^{3} d^{2} + 11 \, c^{2} d^{3} + c d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} \sqrt {-\frac {a}{{\left (c^{2} + c d\right )} g}} + {\left (289 \, a c^{4} + 480 \, a c^{3} d + 230 \, a c^{2} d^{2} + 32 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right ) + {\left (a c^{4} + 4 \, a c^{3} d + 6 \, a c^{2} d^{2} + 4 \, a c d^{3} + a d^{4} + {\left (128 \, a c^{4} + 256 \, a c^{3} d + 160 \, a c^{2} d^{2} + 32 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{4} + 4 \, {\left (64 \, a c^{4} + 112 \, a c^{3} d + 56 \, a c^{2} d^{2} + 7 \, a c d^{3}\right )} \cos \left (f x + e\right )^{3} - 2 \, {\left (80 \, a c^{4} + 144 \, a c^{3} d + 83 \, a c^{2} d^{2} + 18 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{2} - 4 \, {\left (72 \, a c^{4} + 119 \, a c^{3} d + 56 \, a c^{2} d^{2} + 7 \, a c d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{d^{4} \cos \left (f x + e\right )^{5} + {\left (4 \, c d^{3} + d^{4}\right )} \cos \left (f x + e\right )^{4} + c^{4} + 4 \, c^{3} d + 6 \, c^{2} d^{2} + 4 \, c d^{3} + d^{4} - 2 \, {\left (3 \, c^{2} d^{2} + d^{4}\right )} \cos \left (f x + e\right )^{3} - 2 \, {\left (2 \, c^{3} d + 3 \, c^{2} d^{2} + 4 \, c d^{3} + d^{4}\right )} \cos \left (f x + e\right )^{2} + {\left (c^{4} + 6 \, c^{2} d^{2} + d^{4}\right )} \cos \left (f x + e\right ) + {\left (d^{4} \cos \left (f x + e\right )^{4} - 4 \, c d^{3} \cos \left (f x + e\right )^{3} + c^{4} + 4 \, c^{3} d + 6 \, c^{2} d^{2} + 4 \, c d^{3} + d^{4} - 2 \, {\left (3 \, c^{2} d^{2} + 2 \, c d^{3} + d^{4}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left (c^{3} d + c d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}\right )}{4 \, f}, \frac {\sqrt {\frac {a}{{\left (c^{2} + c d\right )} g}} \arctan \left (\frac {{\left ({\left (8 \, c^{2} + 8 \, c d + d^{2}\right )} \cos \left (f x + e\right )^{2} - 9 \, c^{2} - 8 \, c d - d^{2} + 2 \, {\left (4 \, c^{2} + 3 \, c d\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} \sqrt {\frac {a}{{\left (c^{2} + c d\right )} g}}}{4 \, {\left ({\left (2 \, a c + a d\right )} \cos \left (f x + e\right )^{3} + a c \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (2 \, a c + a d\right )} \cos \left (f x + e\right )\right )}}\right )}{2 \, f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}{\sqrt {g \sin {\left (e + f x \right )}} \left (c + d \sin {\left (e + f x \right )}\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+a\,\sin \left (e+f\,x\right )}}{\sqrt {g\,\sin \left (e+f\,x\right )}\,\left (c+d\,\sin \left (e+f\,x\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________